Optimal. Leaf size=188 \[ -\frac {(d g-c h) (c+d x)^{-m-3} (e+f x)^{m+1}}{d (m+3) (d e-c f)}+\frac {(c+d x)^{-m-2} (e+f x)^{m+1} (c f h (m+1)+d (2 f g-e h (m+3)))}{d (m+2) (m+3) (d e-c f)^2}-\frac {f (c+d x)^{-m-1} (e+f x)^{m+1} (c f h (m+1)+d (2 f g-e h (m+3)))}{d (m+1) (m+2) (m+3) (d e-c f)^3} \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 186, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {79, 45, 37} \begin {gather*} -\frac {(d g-c h) (c+d x)^{-m-3} (e+f x)^{m+1}}{d (m+3) (d e-c f)}+\frac {(c+d x)^{-m-2} (e+f x)^{m+1} (c f h (m+1)-d e h (m+3)+2 d f g)}{d (m+2) (m+3) (d e-c f)^2}-\frac {f (c+d x)^{-m-1} (e+f x)^{m+1} (c f h (m+1)-d e h (m+3)+2 d f g)}{d (m+1) (m+2) (m+3) (d e-c f)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 45
Rule 79
Rubi steps
\begin {align*} \int (c+d x)^{-4-m} (e+f x)^m (g+h x) \, dx &=-\frac {(d g-c h) (c+d x)^{-3-m} (e+f x)^{1+m}}{d (d e-c f) (3+m)}-\frac {(2 d f g+c f h (1+m)-d e h (3+m)) \int (c+d x)^{-3-m} (e+f x)^m \, dx}{d (d e-c f) (3+m)}\\ &=-\frac {(d g-c h) (c+d x)^{-3-m} (e+f x)^{1+m}}{d (d e-c f) (3+m)}+\frac {(2 d f g+c f h (1+m)-d e h (3+m)) (c+d x)^{-2-m} (e+f x)^{1+m}}{d (d e-c f)^2 (2+m) (3+m)}+\frac {(f (2 d f g+c f h (1+m)-d e h (3+m))) \int (c+d x)^{-2-m} (e+f x)^m \, dx}{d (d e-c f)^2 (2+m) (3+m)}\\ &=-\frac {(d g-c h) (c+d x)^{-3-m} (e+f x)^{1+m}}{d (d e-c f) (3+m)}+\frac {(2 d f g+c f h (1+m)-d e h (3+m)) (c+d x)^{-2-m} (e+f x)^{1+m}}{d (d e-c f)^2 (2+m) (3+m)}-\frac {f (2 d f g+c f h (1+m)-d e h (3+m)) (c+d x)^{-1-m} (e+f x)^{1+m}}{d (d e-c f)^3 (1+m) (2+m) (3+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 181, normalized size = 0.96 \begin {gather*} \frac {(d g-c h) (c+d x)^{-m-3} (e+f x)^{m+1}}{d (-m-3) (d e-c f)}-\frac {\left (\frac {(c+d x)^{-m-2} (e+f x)^{m+1}}{(-m-2) (d e-c f)}+\frac {f (c+d x)^{-m-1} (e+f x)^{m+1}}{(-m-2) (-m-1) (d e-c f)^2}\right ) (-h (c f (m+1)+d e (-m-3))-2 d f g)}{d (-m-3) (d e-c f)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.08, size = 0, normalized size = 0.00 \begin {gather*} \int (c+d x)^{-4-m} (e+f x)^m (g+h x) \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.84, size = 905, normalized size = 4.81 \begin {gather*} -\frac {{\left ({\left (2 \, d^{3} f^{3} g - {\left (d^{3} e f^{2} - c d^{2} f^{3}\right )} h m - {\left (3 \, d^{3} e f^{2} - c d^{2} f^{3}\right )} h\right )} x^{4} + {\left (c d^{2} e^{3} - 2 \, c^{2} d e^{2} f + c^{3} e f^{2}\right )} g m^{2} + {\left (8 \, c d^{2} f^{3} g + {\left (d^{3} e^{2} f - 2 \, c d^{2} e f^{2} + c^{2} d f^{3}\right )} h m^{2} - 4 \, {\left (3 \, c d^{2} e f^{2} - c^{2} d f^{3}\right )} h - {\left (2 \, {\left (d^{3} e f^{2} - c d^{2} f^{3}\right )} g - {\left (3 \, d^{3} e^{2} f - 8 \, c d^{2} e f^{2} + 5 \, c^{2} d f^{3}\right )} h\right )} m\right )} x^{3} + {\left (12 \, c^{2} d f^{3} g + {\left ({\left (d^{3} e^{2} f - 2 \, c d^{2} e f^{2} + c^{2} d f^{3}\right )} g + {\left (d^{3} e^{3} - c d^{2} e^{2} f - c^{2} d e f^{2} + c^{3} f^{3}\right )} h\right )} m^{2} + 3 \, {\left (d^{3} e^{3} - 3 \, c d^{2} e^{2} f - 3 \, c^{2} d e f^{2} + c^{3} f^{3}\right )} h + {\left ({\left (d^{3} e^{2} f - 8 \, c d^{2} e f^{2} + 7 \, c^{2} d f^{3}\right )} g + 4 \, {\left (d^{3} e^{3} - c d^{2} e^{2} f - c^{2} d e f^{2} + c^{3} f^{3}\right )} h\right )} m\right )} x^{2} + 2 \, {\left (c d^{2} e^{3} - 3 \, c^{2} d e^{2} f + 3 \, c^{3} e f^{2}\right )} g + {\left (c^{2} d e^{3} - 3 \, c^{3} e^{2} f\right )} h + {\left ({\left (3 \, c d^{2} e^{3} - 8 \, c^{2} d e^{2} f + 5 \, c^{3} e f^{2}\right )} g + {\left (c^{2} d e^{3} - c^{3} e^{2} f\right )} h\right )} m + {\left ({\left ({\left (d^{3} e^{3} - c d^{2} e^{2} f - c^{2} d e f^{2} + c^{3} f^{3}\right )} g + {\left (c d^{2} e^{3} - 2 \, c^{2} d e^{2} f + c^{3} e f^{2}\right )} h\right )} m^{2} + 2 \, {\left (d^{3} e^{3} - 3 \, c d^{2} e^{2} f + 3 \, c^{2} d e f^{2} + 3 \, c^{3} f^{3}\right )} g + 4 \, {\left (c d^{2} e^{3} - 3 \, c^{2} d e^{2} f\right )} h + {\left ({\left (3 \, d^{3} e^{3} - 7 \, c d^{2} e^{2} f - c^{2} d e f^{2} + 5 \, c^{3} f^{3}\right )} g + {\left (5 \, c d^{2} e^{3} - 8 \, c^{2} d e^{2} f + 3 \, c^{3} e f^{2}\right )} h\right )} m\right )} x\right )} {\left (d x + c\right )}^{-m - 4} {\left (f x + e\right )}^{m}}{6 \, d^{3} e^{3} - 18 \, c d^{2} e^{2} f + 18 \, c^{2} d e f^{2} - 6 \, c^{3} f^{3} + {\left (d^{3} e^{3} - 3 \, c d^{2} e^{2} f + 3 \, c^{2} d e f^{2} - c^{3} f^{3}\right )} m^{3} + 6 \, {\left (d^{3} e^{3} - 3 \, c d^{2} e^{2} f + 3 \, c^{2} d e f^{2} - c^{3} f^{3}\right )} m^{2} + 11 \, {\left (d^{3} e^{3} - 3 \, c d^{2} e^{2} f + 3 \, c^{2} d e f^{2} - c^{3} f^{3}\right )} m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int {\left (h x + g\right )} {\left (d x + c\right )}^{-m - 4} {\left (f x + e\right )}^{m}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 509, normalized size = 2.71 \begin {gather*} -\frac {\left (-c^{2} f^{2} h \,m^{2} x +2 c d e f h \,m^{2} x -c d \,f^{2} h m \,x^{2}-d^{2} e^{2} h \,m^{2} x +d^{2} e f h m \,x^{2}-c^{2} f^{2} g \,m^{2}-4 c^{2} f^{2} h m x +2 c d e f g \,m^{2}+8 c d e f h m x -2 c d \,f^{2} g m x -c d \,f^{2} h \,x^{2}-d^{2} e^{2} g \,m^{2}-4 d^{2} e^{2} h m x +2 d^{2} e f g m x +3 d^{2} e f h \,x^{2}-2 d^{2} f^{2} g \,x^{2}+c^{2} e f h m -5 c^{2} f^{2} g m -3 c^{2} f^{2} h x -c d \,e^{2} h m +8 c d e f g m +10 c d e f h x -6 c d \,f^{2} g x -3 d^{2} e^{2} g m -3 d^{2} e^{2} h x +2 d^{2} e f g x +3 c^{2} e f h -6 c^{2} f^{2} g -c d \,e^{2} h +6 c d e f g -2 d^{2} e^{2} g \right ) \left (d x +c \right )^{-m -3} \left (f x +e \right )^{m +1}}{c^{3} f^{3} m^{3}-3 c^{2} d e \,f^{2} m^{3}+3 c \,d^{2} e^{2} f \,m^{3}-d^{3} e^{3} m^{3}+6 c^{3} f^{3} m^{2}-18 c^{2} d e \,f^{2} m^{2}+18 c \,d^{2} e^{2} f \,m^{2}-6 d^{3} e^{3} m^{2}+11 c^{3} f^{3} m -33 c^{2} d e \,f^{2} m +33 c \,d^{2} e^{2} f m -11 d^{3} e^{3} m +6 c^{3} f^{3}-18 c^{2} d e \,f^{2}+18 c \,d^{2} e^{2} f -6 d^{3} e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int {\left (h x + g\right )} {\left (d x + c\right )}^{-m - 4} {\left (f x + e\right )}^{m}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.41, size = 869, normalized size = 4.62 \begin {gather*} \frac {x^2\,{\left (e+f\,x\right )}^m\,\left (h\,c^3\,f^3\,m^2+4\,h\,c^3\,f^3\,m+3\,h\,c^3\,f^3-h\,c^2\,d\,e\,f^2\,m^2-4\,h\,c^2\,d\,e\,f^2\,m-9\,h\,c^2\,d\,e\,f^2+g\,c^2\,d\,f^3\,m^2+7\,g\,c^2\,d\,f^3\,m+12\,g\,c^2\,d\,f^3-h\,c\,d^2\,e^2\,f\,m^2-4\,h\,c\,d^2\,e^2\,f\,m-9\,h\,c\,d^2\,e^2\,f-2\,g\,c\,d^2\,e\,f^2\,m^2-8\,g\,c\,d^2\,e\,f^2\,m+h\,d^3\,e^3\,m^2+4\,h\,d^3\,e^3\,m+3\,h\,d^3\,e^3+g\,d^3\,e^2\,f\,m^2+g\,d^3\,e^2\,f\,m\right )}{{\left (c\,f-d\,e\right )}^3\,{\left (c+d\,x\right )}^{m+4}\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {x\,{\left (e+f\,x\right )}^m\,\left (h\,c^3\,e\,f^2\,m^2+3\,h\,c^3\,e\,f^2\,m+g\,c^3\,f^3\,m^2+5\,g\,c^3\,f^3\,m+6\,g\,c^3\,f^3-2\,h\,c^2\,d\,e^2\,f\,m^2-8\,h\,c^2\,d\,e^2\,f\,m-12\,h\,c^2\,d\,e^2\,f-g\,c^2\,d\,e\,f^2\,m^2-g\,c^2\,d\,e\,f^2\,m+6\,g\,c^2\,d\,e\,f^2+h\,c\,d^2\,e^3\,m^2+5\,h\,c\,d^2\,e^3\,m+4\,h\,c\,d^2\,e^3-g\,c\,d^2\,e^2\,f\,m^2-7\,g\,c\,d^2\,e^2\,f\,m-6\,g\,c\,d^2\,e^2\,f+g\,d^3\,e^3\,m^2+3\,g\,d^3\,e^3\,m+2\,g\,d^3\,e^3\right )}{{\left (c\,f-d\,e\right )}^3\,{\left (c+d\,x\right )}^{m+4}\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {c\,e\,{\left (e+f\,x\right )}^m\,\left (-h\,c^2\,e\,f\,m-3\,h\,c^2\,e\,f+g\,c^2\,f^2\,m^2+5\,g\,c^2\,f^2\,m+6\,g\,c^2\,f^2+h\,c\,d\,e^2\,m+h\,c\,d\,e^2-2\,g\,c\,d\,e\,f\,m^2-8\,g\,c\,d\,e\,f\,m-6\,g\,c\,d\,e\,f+g\,d^2\,e^2\,m^2+3\,g\,d^2\,e^2\,m+2\,g\,d^2\,e^2\right )}{{\left (c\,f-d\,e\right )}^3\,{\left (c+d\,x\right )}^{m+4}\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {d^2\,f^2\,x^4\,{\left (e+f\,x\right )}^m\,\left (c\,f\,h-3\,d\,e\,h+2\,d\,f\,g+c\,f\,h\,m-d\,e\,h\,m\right )}{{\left (c\,f-d\,e\right )}^3\,{\left (c+d\,x\right )}^{m+4}\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {d\,f\,x^3\,{\left (e+f\,x\right )}^m\,\left (4\,c\,f+c\,f\,m-d\,e\,m\right )\,\left (c\,f\,h-3\,d\,e\,h+2\,d\,f\,g+c\,f\,h\,m-d\,e\,h\,m\right )}{{\left (c\,f-d\,e\right )}^3\,{\left (c+d\,x\right )}^{m+4}\,\left (m^3+6\,m^2+11\,m+6\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________